package com.mvc.security.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.mvc.framework.model.Auditable;
import com.mvc.framework.service.BaseService;
import com.mvc.security.model.Server;

@Service
public class ServerManager extends BaseService<Server, Integer> {

	public List<Server> getServerByContext(String context) {
		Server example = new Server();
		example.setContext(context);
		example.setRecStatus(Auditable.REC_STATUS_VALID);
		return getHibernateTemplate().findByExample(example);
	}

	public List<Server> getAll() {
		Server server = new Server();
		server.setRecStatus(Auditable.REC_STATUS_VALID);
		return getHibernateTemplate().findByExample(server);
	}
}
